#include<stdio.h>
int main()
{
	char arr[99];
	gets(arr);
	int count1=0,count2=0,count3=0;
	char *p=arr;
	while(*p!='\0')
	{
		if(*p<='z'&&*p>='a'||*p<='Z'&&*p>='A')
		{
			count1++;
		}
		else if(*p<='9'&&*p>='0')
		{
			count2++;
		}
		else
		count3++;
		p++;
	 } 
	 printf("%d %d %d",count1,count2,count3);
 } 
